import abc #利用abc模块实现抽象类
        

class QuantBuider( metaclass=abc.ABCMeta): 
    
    # @abc.abstractmethod  
    # def get_feature(self):
    #     raise NotImplementedError
    
    # @abc.abstractmethod  
    def get_data(self):
        raise NotImplementedError
    
    # @abc.abstractmethod  
    def feature_fliter(self):
        raise NotImplementedError
    
    # @abc.abstractmethod  
    def data_split(self):
        raise NotImplementedError
    
    # @abc.abstractmethod 
    def data_standard(self):
        raise NotImplementedError
    
    # @abc.abstractmethod 
    def pre_train(self):
        raise NotImplementedError
    
    # @abc.abstractmethod 
    def rolling_train(self):
        raise NotImplementedError
    
    # @abc.abstractmethod 
    def rolling_split(self):
        raise NotImplementedError
    
    # @abc.abstractmethod 
    def ic_record(self):
        raise NotImplementedError
    
    
    # @abc.abstractmethod 
    def result_inverse(self):
        raise NotImplementedError
    
    # @abc.abstractmethod 
    def result_merge(self):
        raise NotImplementedError
    
    # @abc.abstractmethod 
    def backtest(self):
        raise NotImplementedError
 

        
       
    
class QuantDirector(metaclass=abc.ABCMeta):
    def __init__(self, QuantBuider) -> None:
        # self.__dict__ = GetParam.__dict__
        self.qb = QuantBuider
    
    @abc.abstractmethod    
    def creat_quant(self):
        self.qb.get_feature()
        self.qb.get_label()
        self.qb.data_split()
        self.qb.data_standard()
        self.qb.pre_train()
        self.qb.rolling_train()
        self.qb.rolling_split()
        self.qb.Ic_record()
        self.qb.Ic_record()
        self.qb.result_inverse()
        self.qb.result_merge()
        self.qb.backtest()
